package com.ruibang.glass.produce.entity;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.alibaba.excel.enums.poi.VerticalAlignmentEnum;
import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import com.teaming.cloud.framework2.common.tools.LocalDateStringConverter;
import com.teaming.cloud.framework2.common.tools.LocalDateTimeStringConverter;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @Author: songJinKang
 * @CreateTime: 2024-03-11  14:54
 * @Description: TODO:生产-配料-小料预混记录实体
 * @Version: 1.0
 */
@Data
@ApiModel
@TableName(value = "charge_mix_small_material")
@ContentStyle(horizontalAlignment = HorizontalAlignmentEnum.CENTER, verticalAlignment = VerticalAlignmentEnum.CENTER)
public class MaterialPremixRecord {

    @ApiModelProperty(value = "主键id")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @ExcelIgnore
    private String id;

    @ApiModelProperty("预混日期")
    @ColumnWidth(12)
    @ExcelProperty(value = {"预混日期"}, index = 0, converter = LocalDateStringConverter.class)
    @TableField("small_material_date")
    private LocalDate date;

    @ApiModelProperty("作业序号")
    @ColumnWidth(10)
    @ExcelProperty(value = {"作业序号"}, index = 1)
    private String jobNumber;

    @ApiModelProperty(value = "料方号")
    @ColumnWidth(10)
    @ExcelProperty(value = {"料方号"}, index = 2)
    @TableField("material_number")
    private String materialCode;

    @ApiModelProperty(value = "单次开始时间")
    @ColumnWidth(12)
    @ExcelProperty(value = {"预混日期"}, index = 3, converter = LocalDateTimeStringConverter.class)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime startTime;

    @ApiModelProperty(value = "单次结束时间")
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ColumnWidth(12)
    @ExcelProperty(value = {"预混日期"}, index = 4, converter = LocalDateTimeStringConverter.class)
    @TableField("complete_time")
    private LocalDateTime endTime;

    @ApiModelProperty(value = "作业日志")
    @ColumnWidth(10)
    @ExcelProperty(value = {"作业日志"}, index = 5)
    private String jobLog;

    @ApiModelProperty("作业负责人")
    @ColumnWidth(10)
    @ExcelProperty(value = {"作业负责人"}, index = 6)
    @TableField("job_person")
    private String jobManager;

    @ApiModelProperty("复核人")
    @ColumnWidth(10)
    @ExcelProperty(value = {"复核人"}, index = 7)
    @TableField("job_checker")
    private String reviewer;



    @ApiModelProperty("投入料仓")
    @ColumnWidth(10)
    @ExcelProperty(value = {"投入料仓"}, index = 8)
    @TableField("in_bin")
    private String silo;

    /**
     * 实际重量
     */
    @ApiModelProperty("实际总重")
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "总重"}, index = 9)
    @TableField("sm_total_weight_actual")
    private Double realityTotalWeight;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料1"}, index = 10)
    @TableField("sm1_weight_actual")
    private Double realityMaterial1;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料2"}, index = 11)
    @TableField("sm2_weight_actual")
    private Double realityMaterial2;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料3"}, index = 12)
    @TableField("sm3_weight_actual")
    private Double realityMaterial3;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料4"}, index = 13)
    @TableField("sm4_weight_actual")
    private Double realityMaterial4;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料5"}, index = 14)
    @TableField("sm5_weight_actual")
    private Double realityMaterial5;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料6"}, index = 15)
    @TableField("sm6_weight_actual")
    private Double realityMaterial6;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料7"}, index = 16)
    @TableField("sm7_weight_actual")
    private Double realityMaterial7;

    /**
     * 设定重量
     */
    @ApiModelProperty("设定总重")
    @ColumnWidth(10)
    @ExcelProperty(value = {"设定重量(kg)", "总重"}, index = 17)
    @TableField("sm_total_weight_set")
    private Double setTotalWeight;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料1"}, index = 18)
    @TableField("sm1_weight_set")
    private Double setMaterial1;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料2"}, index = 19)
    @TableField("sm2_weight_set")
    private Double setMaterial2;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料3"}, index = 20)
    @TableField("sm3_weight_set")
    private Double setMaterial3;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料4"}, index = 21)
    @TableField("sm4_weight_set")
    private Double setMaterial4;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料5"}, index = 22)
    @TableField("sm5_weight_set")
    private Double setMaterial5;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料6"}, index = 23)
    @TableField("sm6_weight_set")
    private Double setMaterial6;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料7"}, index = 24)
    @TableField("sm7_weight_set")
    private Double setMaterial7;

    /**
     * 误差值
     */
    @ApiModelProperty("误差总重")
    @ColumnWidth(10)
    @ExcelProperty(value = {"误差值(g)", "总重"}, index = 25)
    @TableField("sm_total_weight_error_value")
    private Double errorTotalWeight;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料1"}, index = 26)
    @TableField("sm1_weight_error_value")
    private Double errorMaterial1;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料2"}, index = 27)
    @TableField("sm2_weight_error_value")
    private Double errorMaterial2;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料3"}, index = 28)
    @TableField("sm3_weight_error_value")
    private Double errorMaterial3;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料4"}, index = 29)
    @TableField("sm4_weight_error_value")
    private Double errorMaterial4;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料5"}, index = 30)
    @TableField("sm5_weight_error_value")
    private Double errorMaterial5;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料6"}, index = 31)
    @TableField("sm6_weight_error_value")
    private Double errorMaterial6;
    @ColumnWidth(10)
    @ExcelProperty(value = {"实际重量(kg)", "小料7"}, index = 32)
    @TableField("sm7_weight_error_value")
    private Double errorMaterial7;
    @ApiModelProperty(value = "备注")
    @ExcelIgnore
    private String remark;
    @ApiModelProperty(value = "逻辑删除标识")
    @ExcelIgnore
    private String delFlag;


    @ApiModelProperty("作业负责人用户ID")
    @ExcelIgnore
    @TableField(exist = false)
    private String jobManagerId;

    @ApiModelProperty("复核人用户ID")
    @ExcelIgnore
    @TableField(exist = false)
    private String reviewerId;
}

